package wenjie.chen.transfer.command.fixture

import wenjie.chen.transfer.command.TransferCommand;


class TransferCommandFixture {
    TransferCommand target = new TransferCommand()

    def remitter(String remitterAccountId) {
        target.remitterAccountId = remitterAccountId
        this
    }

    def receiver(String receiverAccountId) {
        target.receiverAccountId = receiverAccountId
        this
    }

    def amount(double amount) {
        target.amount = amount
        this
    }

    def build() {
        target
    }

    static def aTransferCommand() {
        new TransferCommandFixture()
            .remitter("1")
            .receiver("2")
            .amount(100)
    }
}
